A credential such as a password for a given user device and a given WiFi network gateway can be stored in the cloud and be associated with a user account. When the user activates a new device and logs into the user account, a cloud-based service can provide the password to the device, which in turn can provide the credential to the WiFi gateway. Thus, the user need not manually reenter his WiFi password upon activating a new device. The password may not be accessible in plaintext by the user via the device. This can enhance the security of the password storing and providing system.